﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace UI.Web
{
    public partial class Article : System.Web.UI.Page
    {
        protected Models.ModelArticle OneArticle;
        protected Models.ModelArticle UpArticle;
        protected Models.ModelArticle DownArticle;
        protected List<Models.ModelArticle> GoodList;
        protected string column;
        protected string columnParent;
        protected void Page_Load(object sender, EventArgs e)
        {
            column = Request.QueryString["column"];
            string cid=BLL.GetList.ColumnNameToID(true)[column].ToString();
            columnParent = BLL.Find.FindOneColumn(BLL.Find.FindOneColumn(cid).ParentID.ToString()).Name;
            string id = Request.QueryString["id"];
            OneArticle = BLL.Find.FindArticle(id);
            UpArticle = BLL.Find.FindUpandDown("UpdateDate < '" + OneArticle.UpdateDate.ToString() + "'", OneArticle.ColumnID, "desc");
            DownArticle = BLL.Find.FindUpandDown("UpdateDate > '" + OneArticle.UpdateDate.ToString() + "'", OneArticle.ColumnID, "asc");
            GoodList = BLL.GetList.GetArticleList("TOP 10 *", cid, "Click", "desc");

        }
    }
}